<!DOCTYPE html>
<html lang="zh-CN">
<!--作者: 深秋-->
<!--QQ : 1361582519-->
<!--官方QQ群: 758107405-->
<!--GitHub: https://github.com/kaindev8/starMQ-->
<!--保留版权信息，尊重开源精神!-->
<!--禁止修改此文件!-->
<head>
    <meta charset="UTF-8">
    <meta name="author" content="深秋 i@kain8.cn">
    <meta name="qq" content="1361582519">
    <meta name="Copyright" content="本系统版权归https://github.com/kaindev8/所有!">
    <meta name="description" content="{$c.desc}">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--核心CSS-->
    <link rel="stylesheet" id="css-main" href="__STATIC__/css/codebase.min-5.4.css">
    <!--表格样式-->
    <link rel="stylesheet" href="__STATIC__/css/dataTables.bootstrap5.min.css">
    <link href="__STATIC__/css/nprogress.css" rel="stylesheet">
    <link href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-0-M/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
    <!--上传图片-->
    <link rel="stylesheet" href="__STATIC__/js/plugins/dropzone/min/dropzone.min.css">

    <title>{$c.sitename}</title>
    <style>
        td {
            white-space: nowrap;
        }
        /* 谷歌与苹果自带浏览器 隐藏浏览器自带滚动条 */
        *::-webkit-scrollbar {
            display: none;
        }
        /* 火狐浏览器 隐藏浏览器自带滚动条 */
        * {
            scrollbar-width: none;
        }
        /* IE 与微软浏览器 隐藏浏览器自带滚动条 */
        * {
            -ms-overflow-style: none;
        }
    </style>
</head>

<body>
<div id="page-container"
     class="sidebar-o enable-page-overlay side-scroll page-header-modern main-content-boxed side-trans-enabled">
    <div id="page-overlay"></div>
    <nav id="sidebar">
        <div class="sidebar-content">
            <div class="content-header justify-content-lg-center">
                <div>
                        <span class="smini-visible fw-bold tracking-wide fs-lg">
                            c<span class="text-primary">b</span>
                        </span>
                    <a class="link-fx fw-bold tracking-wide mx-auto"  href="/">
                            <span class="smini-hidden">
                                <i class="fa fa-fire text-primary"></i>
                                <span class="fs-4 text-dual">{$c.sitename}</span>
                            </span>
                    </a>
                </div>
                <div>
                    <button type="button" class="btn btn-sm btn-alt-danger d-lg-none" data-toggle="layout"
                            data-action="sidebar_close">
                        <i class="fa fa-fw fa-times"></i>
                    </button>
                </div>
            </div>
            <div class="js-sidebar-scroll" data-simplebar="init">
                <div class="simplebar-wrapper" style="margin: 0px;">
                    <div class="simplebar-height-auto-observer-wrapper">
                        <div class="simplebar-height-auto-observer"></div>
                    </div>
                    <div class="simplebar-mask">
                        <div class="simplebar-offset" style="right: 0px; bottom: 0px;">
                            <div class="simplebar-content-wrapper" tabindex="0" role="region"
                                 aria-label="scrollable content" style="height: 100%; overflow: hidden;">
                                <div class="simplebar-content" style="padding: 0px;">
                                    <div class="content-side content-side-user px-0 py-0">
                                        <div class="smini-hidden text-center mx-auto">
                                            <!-- 头像 -->
                                            <a class="img-link" data-pjax href="/User/user">
                                                <img class="img-avatar"
                                                     src="http://q1.qlogo.cn/g?b=qq&nk={$u.qq}&s=100" alt="">
                                            </a>
                                            <ul class="list-inline mt-3 mb-0">
                                                <li class="list-inline-item">
                                                    <a class="link-fx text-dual fs-sm fw-semibold" data-pjax
                                                       href="/User/user">{$u.nickname}</a>
                                                </li>
                                                <li class="list-inline-item">
                                                    <a class="link-fx text-dual" data-toggle="layout" data-action="dark_mode_toggle" href="javascript:void(0)">
                                                        <i class="fa fa-burn"></i>
                                                    </a>
                                                </li>

                                                <!-- 退出登录 -->
                                                <li class="list-inline-item">
                                                    <a class="link-fx text-dual" href="javascript:void(0)"
                                                       onclick="logout()">
                                                        <i class="fa fa-sign-out-alt"></i>
                                                    </a>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                    <div class="content-side content-side-full">
                                        <ul class="nav-main" id="nav-main">
                                            <li class="nav-main-item">
                                                <a class="nav-main-link active" data-pjax href="/User/index">
                                                    <i class="nav-main-link-icon fa fa-rocket"></i>
                                                    <span class="nav-main-link-name">控制台</span>
                                                </a>
                                            </li>

                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="/User/config">
                                                    <i class="nav-main-link-icon fa fa-cog"></i>
                                                    <span class="nav-main-link-name">系统设置</span>
                                                </a>
                                            </li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="/User/smtp">
                                                    <i class="nav-main-link-icon far fa-envelope"></i>
                                                    <span class="nav-main-link-name">发信设置</span>
                                                </a>
                                            </li>
                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="/User/channel">
                                                    <i class="nav-main-link-icon fa fa-qrcode"></i>
                                                    <span class="nav-main-link-name">通道管理</span>
                                                </a>
                                            </li>

                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="/User/jk">
                                                    <i class="nav-main-link-icon fa fa-bolt"></i>
                                                    <span class="nav-main-link-name">监控管理</span>
                                                </a>
                                            </li>

                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="/User/order">
                                                    <i class="nav-main-link-icon fa fa-list"></i>
                                                    <span class="nav-main-link-name">订单列表</span>
                                                </a>
                                            </li>

                                            <li class="nav-main-item">
                                                <a class="nav-main-link" data-pjax href="/User/log">
                                                    <i class="nav-main-link-icon far fa-clipboard"></i>
                                                    <span class="nav-main-link-name">操作日志</span>
                                                </a>
                                            </li>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="simplebar-placeholder" style="width: auto; height: 912px;"></div>
                </div>
                <div class="simplebar-track simplebar-horizontal" style="visibility: hidden;">
                    <div class="simplebar-scrollbar" style="width: 0px; display: none;"></div>
                </div>
                <div class="simplebar-track simplebar-vertical" style="visibility: hidden;">
                    <div class="simplebar-scrollbar" style="height: 0px; display: none;"></div>
                </div>
            </div>
        </div>
    </nav>
    <header id="page-header">
        <div class="content-header">
            <div class="space-x-1">
                <button type="button" class="btn btn-sm btn-alt-primary" data-toggle="layout"
                        data-action="sidebar_toggle">
                    <i class="fa fa-fw fa-bars"></i>
                </button>
            </div>
            <div class="space-x-1">
                <div class="dropdown d-inline-block">
                    <button type="button" class="btn btn-sm btn-alt-primary" id="page-header-user-dropdown"
                            data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-user d-sm-none"></i>
                        <span class="d-none d-sm-inline-block fw-semibold">菜单</span>
                        <i class="fa fa-angle-down opacity-50 ms-1"></i>
                    </button>
                    <div class="dropdown-menu dropdown-menu-md dropdown-menu-end p-0"
                         aria-labelledby="page-header-user-dropdown">
                        <div class="p-2">
                            <a class="dropdown-item d-flex align-items-center justify-content-between space-x-1" data-pjax
                               href="/User/user">
                                <span>个人信息</span>
                                <i class="fa fa-fw fa-user text-corporate"></i>
                            </a>

                            <a class="dropdown-item d-flex align-items-center justify-content-between space-x-1"
                               href="javascript:void(0)" onclick="deletecache()">
                                <span>清除缓存</span>
                                <i class="fa fa-fw fa-trash-can text-pulse"></i>
                            </a>

                            <a class="dropdown-item d-flex align-items-center justify-content-between space-x-1"
                               href="javascript:void(0)" onclick="logout()">
                                <span>注销登录</span>
                                <i class="fa fa-fw fa-sign-out-alt text-earth"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="page-header-loader" class="overlay-header bg-primary">
            <div class="content-header">
                <div class="w-100 text-center">
                    <i class="far fa-sun fa-spin text-white"></i>
                </div>
            </div>
        </div>
    </header>
    <main id="main-container">
        {block name="main"}{/block}
    </main>

</div>
<!--JS-->
<!--jquery-->
<script src="__STATIC__/js/lib/jquery.min.js"></script>
<!--pjax进度条-->
<script src="https://cdn.staticfile.org/nprogress/0.2.0/nprogress.js"></script>
<!--UIjs-->
<script src="__STATIC__/js/codebase.app.min-5.4.js"></script>
<!--图表-->
<script src="__STATIC__/js/plugins/chart.js/chart.min.js"></script>
<script src="__STATIC__/js/pages/be_pages_dashboard.min.js"></script>
<!--layer-->
<script src="__STATIC__/js/layer.js"></script>
<!--复制-->
<script src="https://cdn.staticfile.org/clipboard.js/2.0.11/clipboard.min.js"></script>
<!--通知-->
<script src="__STATIC__/js/bootstrap-notify.min.js"></script>
<!--核心js-->
<script src="__STATIC__/js/index.js"></script>
<!--pjax-->
<script src="https://cdn.bootcdn.net/ajax/libs/jquery.pjax/2.0.1/jquery.pjax.min.js"></script>

<script>
    /**
     * pjax
     */
    $(function() {
        $(document).pjax('a[data-pjax]', '#main-container', {
            fragment:'#main-container', timeout:10000
        });
        $(document).on('submit', 'form', function(event) {
            $.pjax.submit(event, '#main-container', {
                fragment: '#main-container',
                timeout: 10000
            })
        });
        $(document).on('pjax:send', function() {
            NProgress.start()
            $(".pjax_loading").css("display", "block");});
        $(document).on('pjax:complete', function() {
            NProgress.done()
            route();
            $(".pjax_loading").css("display", "none");
        });
    });

    function logout() {
        layer.confirm('你确定要注销登录吗?', {
            btn         :   ['确定', '取消'],
            closeBtn    :   0,
        }, () => {
            $.ajax({
                url         :   "/User/logout",
                cache       :   false,
                type        :   "POST",
                dataType    :   "json",
                success     :   res => {
                    layer.closeAll();
                    if (res.code == 200) {
                        setTimeout(() => {
                            location.reload();
                        }, 2000);
                        notify(res.msg, "success");
                    } else {
                        notify(res.msg, "danger");
                    }
                },
                error       :   (XMLHttpRequest, textStatus, errorThrown) => {
                    layer.closeAll();
                    notify(errorThrown, "danger");
                }
            });
            return false;
        });
    };
</script>


{if $c.appkey == ""}
<script>
    layer.alert("第一次请点击重置密钥生成密钥!");
</script>
{/if}

</body>

</html>